<!--#index.html-->
<!--head-->
<title>登录wBBS</title>
<script>
    var redirectTimeout;
    $(function() {
        $("#form").ajaxFormEx(function(data) {
            if(data.msg) {
                $(".alert").removeClass("alert-success").addClass("alert-error").text(data.msg);
                $(".alert").fadeOut("fast").fadeIn("fast")
            } else {
                $(".alert").html("欢迎访问wbbs, 3秒钟后自动<a href='${url}' onclick='clearTimeout(redirectTimeout)'>跳转</a>");
                $(".alert").removeClass("alert-error").addClass("alert-success");
                $(".alert").fadeOut(0).fadeIn("fast");
                redirectTimeout = setTimeout("window.location.href = '${url}'", 3000);
            }
        })
    })
</script>
<style>
    .alert {
        width: 300px;
        margin-left: 180px;
        display: none;
    }
</style>
<!--head end-->
<!--content-->
<form action="login.do" method="post" id="form" class="form-horizontal">
    <legend>登录WebWheel论坛</legend>
    <div class="alert"></div>
    <div class="control-group">
        <label class="control-label" for="id">用户名</label>
        <div class="controls">
            <input type="text" id="id" name="id"/>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="pwd">密码</label>
        <div class="controls">
            <input type="password" id="pwd" name="pwd"/>
        </div>
    </div>
    <div class="control-group">
        <div class="controls">
            <input type="submit" value="登录" class="btn btn-primary"/>
        </div>
    </div>
</form>
<!--content end-->
<!--#index.html end-->